<template>
	<view>
		<nav-bars title="认证类型"></nav-bars>
		<view class="certificate" style="">
			<view class="certificate_tit" style="">请选择认证类型</view>
			<view
				class="SelectView"
				:style="{ 'border-color': current == index ? '#bb9e64' : '#333333' }"
				v-for="(item, index) in SelectLabel"
				:key="index"
				@click="SelectChaenge(item, index)"
			>
				<view>
					<view class="Title">{{ item.title }}</view>
					<view class="Message">{{ item.mes }}</view>
				</view>
				<view>
					<label><radio color="#BB9E64" :value="item.checked" :checked="item.checked" /></label>
				</view>
			</view>
			<view class="certificate_btn" @click="GoEnterprise">下一步</view>
		</view>
	</view>
</template>
<script>
export default {
	components: {},
	data() {
		return {
			SelectLabel: [
				{ title: '三证认证', mes: '营业执照、组织机构代码证、税务登记证', checked: false, is: 'three' },
				{ title: '一证认证', mes: '仅营业执照', checked: false, is: 'one' }
			],
			current: null,
			isCetificate: ''
		};
	},
	mounted() {},
	methods: {
		SelectChaenge(row, index) {
			var that = this;
			var data = that.SelectLabel;
			data.forEach((item, indexs) => {
				if (index == indexs) {
					item.checked = true;
				} else {
					item.checked = false;
				}
			});
			that.current = index;
			that.isCetificate = row.is;
			that.SelectLabel = data;
		},
		GoEnterprise() {
			var that = this;
			if (that.isCetificate != '') {
				if (that.isCetificate == 'one') {
					uni.navigateTo({
						url: '/pages_Verification/verification/enterprise/enterprise'
					});
				} else {
					uni.navigateTo({
						url: '/pages_Verification/verification/enterprise/enterpriseThree'
					});
				}
			} else {
				uni.showToast({
					title: '请选择认证类型',
					icon: 'none',
					duration: 2000
				});
			}
		}
	}
};
</script>
<style lang="less">
page {
	background: #fff;
}
.certificate {
	padding: 32rpx;
	.certificate_tit {
		font-size: 60rpx;
		font-weight: 500;
		color: #212121;
		padding: 100rpx 0;
	}
	.SelectView {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 40rpx;
		border: 3rpx solid #333333;
		border-radius: 20rpx;
		margin-bottom: 52rpx;
		.Title {
			margin-bottom: 10rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: #212121;
		}
		.Message {
			font-size: 24rpx;
			font-weight: 500;
			color: #666666;
		}
	}
	.certificate_btn {
		font-size: 34rpx;
		font-weight: 500;
		color: #ffffff;
		height: 90rpx;
		background: #c3ab7c;
		border-radius: 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 30%;
	}
}
</style>
